﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using DataAnnotationsExtensions;
using System.Web.Mvc;
using MvcEnumDropDownList.Helpers;

namespace BenzInfo.Hockey.LHRAF.Models
{
    [Table("Users")]
    public class User : Person
    {
        [LocalizationEnum(typeof(Resources.Models.User))]
        public enum CategoryEnum : byte
        {
            Administrator = 1
        }

        [Required]
        [EnumDataType(typeof(CategoryEnum))]
        public int CategoryValue { get; set; }

        
        [Display(Name = "DisplayCategory", ResourceType = typeof(Resources.Models.User))]
        public CategoryEnum Category
        {
            get { return (CategoryEnum)CategoryValue; }
            set { CategoryValue = (int)value; }
        }

        [Required]
        [StringLength(50, MinimumLength = 2)]
        [Display(Name = "DisplayUserName", ResourceType = typeof(Resources.Models.User))]
        public string UserName { get; set; }

        [Required]
        [StringLength(50, MinimumLength = 2)]
        [Display(Name = "DisplayPassword", ResourceType = typeof(Resources.Models.User))]
        [DataType(DataType.Password)]
        public string Password { get; set; }
    
    }
}